package pers.xx.sbm;

/**
 * @author ：xiexing
 * @description：准备sql
 * @date ：2021/9/27 9:57
 */
public class PrepareSql {
    public static void main(String[] args) {
        String numbers = StudentConstants.studentNumber;
        String grades = StudentConstants.studentGrade;
        String hjs = StudentConstants.studentHj;
        String counties = StudentConstants.studentCounty;
        String[] numberArray = numbers.split(",\n");
        String[] gradeArray = grades.split(",\n");
        String[] hjArray = hjs.split(",\n");
        String[] countyArray = counties.split(",\n");
        StringBuilder insertSql = new StringBuilder();
        for (int i = 0; i < numberArray.length; i++) {
            insertSql.append("insert into student_enroll(student_number,hj_type,grade,school_sys_code,county_id,enroll_way,is_del,year) values(" + numberArray[i] + "," + hjArray[i] + "," + gradeArray[i] + "," + countyArray[i] + "," + countyArray[i] + ",'手动处理民大附中学生数据',0,2021);\n");
        }
        System.out.println(insertSql.toString());
        System.out.println(numberArray.length);
    }
}
